package com.zzyl.controller.customer;

import com.zzyl.base.PageResponse;
import com.zzyl.base.ResponseResult;
import com.zzyl.dto.DeviceDataPageReqDto;
import com.zzyl.entity.DeviceData;
import com.zzyl.service.DeviceDataService;
import com.zzyl.vo.DeviceDataVo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/device-data")
@Api("管理端 - 设备数据相关的接口")
public class DeviceDataController {
    @Autowired
    private DeviceDataService deviceDataService;

    /**
     * 查询设备属性的详细数据 分页条件查询
     * @param deviceDataPageReqDto
     * @return
     */
    @GetMapping("/get-page")
    public ResponseResult<PageResponse<DeviceDataVo>> getDeviceDataPage(DeviceDataPageReqDto deviceDataPageReqDto){
        PageResponse<DeviceDataVo> page = deviceDataService.getDeviceDataPage(deviceDataPageReqDto);
        return ResponseResult.success(page);
    }

}
